<template>
    <div   class="download-page">
        <van-notify v-model="show" type="success">
            <van-icon name="bell" style="margin-right: 4px;" />
            <span>77TOP提醒您暂无下载链接哦</span>
        </van-notify>
        <div>
            <img src="~/static/down/Frame1171275519@3x.png" alt="" style="width: 142px;height: 88px;">
        </div>
        <div style="display: flex;flex-direction: column;justify-content: center;align-items: center;">
            <img src="~/static/down/Frame1171275510@2x.png" alt=""
                style="width: 303px;height: 224px;object-fit: cover;">
            <img src="~/static/down/Frame1171275504@2x.png" alt=""
                style="width: 176px;height: 50px;object-fit: cover;margin-top: 60px;" @click="clickdown(1)">
            <img src="~/static/down/Frame1171275505@2x.png" alt=""
                style="width: 176px;height: 50px;object-fit: cover;margin-top: 16px;" @click="clickdown(2)">
            <img src="~/static/down/Frame 1171275515@2x.png" alt=""
                style="width: 100%;margin-top: 66px;    object-fit: scale-down;margin-bottom: 60px;">
        </div>
    </div>
</template>
<script>
export default {
    data() {
        return {
            downlist: '',
            show: false,
        }

    },
    mounted() {
        const params = {
            ct: "download",
            ac: "index",
            model: 'h5'
        };
        this.$axios.get("", { params }).then((response) => {

            this.downlist = response.data.data;
            console.log(this.downlist, '打打我');
        });
    },
    methods: {
        clickdown(index) {
            if (index == 2) {
                if (this.downlist.downurl == '') {
                    this.show = true;
                    setTimeout(() => {
                        this.show = false;
                    }, 3000);
                }
                window.location.href = this.downlist.downurl;
            } else if (index == 1) {
                if (this.downlist.downios == '') {
                    this.show = true;
                    setTimeout(() => {
                        this.show = false;
                    }, 3000);
                }
                window.location.href = this.downlist.downios;
            }
        }
    }
}
</script>
<style scoped>
  .download-page{
    width: 100vw;
    height: 100%;
    background: url('~/static/down/bg@2x.png') no-repeat;
    background-size:cover ;
  }


</style>